package com.gemframework.common;

public abstract class BaseController {

    /**
     *
     * @param success
     * @return
     */
    protected Result simpleResult(boolean success) {
        return simpleResult(success, null);
    }
    /**
     *
     * @param success
     * @return
     */
    protected Result simpleResult(boolean success, String errorMessage) {
        return success ? Result.SUCCESS_RESULT :
                errorMessage != null ? Result.fail(errorMessage) :
                        Result.SYSTEM_ERROR_RESULT;
    }

}
